test(sort_utils): ミューテーションテストで冗長テストを削減し検出力を強化#461
Conversation
mutmut で test_sort_utils.py を分析し、統合テスト(resume 系)と重複して 固有ミュータントを殺していない冗長ユニットテスト 8 本を削除(19→12 本)。 あわせて検出力の穴を強化: - test_end_date_desc: start 降順と end 降順が食い違うデータ + 位置ベース assert に修正し、sort_key の end を無視する実装退行を検出可能に - ORM 属性アクセス(本番経路)を検証するテストを追加し、dict 入力偏重で 未検証だった _get の getattr 分岐をカバー 結果: sort_utils の mutation score 79.7% → 94%(survived 15→4、残りは 等価ミュータント等の殺せないノイズ)。他ターゲットへの横展開では追加の 削除余地は無いことを確認済み。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RNCQYkKF5CrjxQt18YFeY5
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTest coverage in backend/tests/test_sort_utils.py was restructured: added SimpleNamespace import and two new tests for attribute-based sorting and full-string date parsing, rewrote test_end_date_desc, and removed several tests covering stability, string-date parsing, and mixed scenarios. ChangesSort utils test coverage update
Estimated code review effort: 2 (Simple) | ~10 minutes Related PRs: None identified. Suggested labels: tests Suggested reviewers: None identified. PoemA rabbit hops through test-file rows, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
mutmut で test_sort_utils.py を分析し、統合テスト(resume 系)と重複して
固有ミュータントを殺していない冗長ユニットテスト 8 本を削除(19→12 本)。
あわせて検出力の穴を強化:
assert に修正し、sort_key の end を無視する実装退行を検出可能に
未検証だった _get の getattr 分岐をカバー
結果: sort_utils の mutation score 79.7% → 94%(survived 15→4、残りは
等価ミュータント等の殺せないノイズ)。他ターゲットへの横展開では追加の
削除余地は無いことを確認済み。
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01RNCQYkKF5CrjxQt18YFeY5
Summary by CodeRabbit